<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>

<html>
	<head>
		<title>IdeaPad - Create Group</title>
		<link rel="stylesheet" type="text/css" href="../styles/main.css">
		<link rel="stylesheet" type="text/css" href="../styles/buttons.css">
		<link rel="stylesheet" type="text/css"
			href="../styles/currentbutton.css">
	</head>
	<body>
		<div class="header">
			<html:link action="/default">
				<img src="/IdeaPad/images/ideapad_logo.png" alt="logo" border="0" />
			</html:link>
			<%
				if (session.getAttribute("username") == null || session.getAttribute("username") == "") {
			%>
			<html:link page="/form/login.jsp" styleClass="menubuttons">Login</html:link>
			<html:link page="/form/registerUser.jsp" styleClass="menubuttons">Register</html:link>
			<%
				} else {
			%>
			Hello
			<%=session.getAttribute("username").toString()%>
			<html:link action="viewGroups" styleClass="currentbutton">Groups</html:link>
			<html:link action="manageGroups" styleClass="menubuttons">Manage Groups</html:link>
			<html:link page="/form/editUserSettings.jsp" styleClass="menubuttons">Settings</html:link>
			<html:link action="logout" styleClass="menubuttons">Logout</html:link>
			<%
				}
			%>
		</div>

		<logic:messagesPresent>
			<font color="red"> <logic:iterate name="Errors" id="Error"
					scope="request">
					<bean:write name="Error" />
					<br />
				</logic:iterate> </font>
		</logic:messagesPresent>

		<html:form action="/createGroup"
			onsubmit="return validateMakeGuessForm(this)">
			Group Name :<html:text name="createGroupForm" property="groupName" />
			<br />
			Parent Group ID :<html:text name="createGroupForm"
				property="parentGroupID" />
			<br />
			<html:submit />
			<html:cancel />
		</html:form>
	</body>
</html>

